package com.hzp.micromall.common.core.api;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author houzipeng
 * @Date 2022/3/7 21:20
 * @Version 1.0
 */
@Setter
@Getter
@ApiModel(value = "page", description = "数据分页")
public class CommonPage<T> implements Serializable {
    @ApiModelProperty("数据页页码")
    private Long pageNum;
    @ApiModelProperty("数据总条数")
    private Long total;
    @ApiModelProperty("数据页页面大小")
    private Long pageSize;
    @ApiModelProperty("数据内容")
    List<T> list;

    public CommonPage(Long pageNum, Long total, Long pageSize, List<T> list) {
        this.pageNum = pageNum;
        this.total = total;
        this.pageSize = pageSize;
        this.list = list;
    }
}

